import request from '@/utils/request'

export function listDatabase(query) {
  return request({
    url: '/database/database/list',
    method: 'get',
    params: query
  })
}

export function getDatabase(postId) {
  return request({
    url: '/database/database/' + postId,
    method: 'get'
  })
}

export function addDatabase(data) {
  return request({
    url: '/database/database',
    method: 'post',
    data: data
  })
}

export function updateDatabase(data) {
  return request({
    url: '/database/database',
    method: 'put',
    data: data
  })
}

export function delDatabase(postId) {
  return request({
    url: '/database/database/' + postId,
    method: 'delete'
  })
}
